﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace DataShow.forecasters
{
    public partial class Index : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            LoadForecasters();
        }

        private void LoadForecasters()
        {
            string result = "";//要输出的html

            string html = "<li class='tab span2'><a href='/forecasters/forecaster.aspx?type={ID}'><i class='mybaseicon'></i>{PNAME}</a> </li>";
            Dictionary<string, string> forecasters = new codeBLL.ForecasterBLL().ReadAllForecasters();
            foreach (var item in forecasters)
            {
                result += html.Replace("{ID}", item.Key + "_UFore").Replace("{PNAME}",item.Value);    
            }
            lbl_content.Text = result;
        }

    }
}